import type { Mapping, Option } from "@/components/ProFrom/ProFrom.vue";

import { computed } from "vue";
import { useGlobalStore } from "@/stores";
const { dictionary } = useGlobalStore();

export const queryFormMap: Mapping[] = [
  // { label: "值班人员", type: "input", prop: "name",  },
  { label: "是否启动", type: "switch", prop: "isoOpen" },
];

export const editFormMap = computed(() =>
  [
    {
      label: "安保人员",
      type: "select",
      prop: "staffId",
      options: dictionary.staffId, //staffList
    },
    {
      label: "职位",
      type: "select",
      prop: "position",
      options: dictionary.groupPosition,
    },
    {
      label: "所属工作组",
      type: "select",
      prop: "workingGroup",
      options: dictionary.workingGroup,
    },
    {
      label: "职责",
      type: "textarea",
      prop: "duty",
    },
  ].map((e) => ({ ...e, required: true }))
);
